
import _3rpt
import sqlalchemy
from sqlalchemy import *

print(sqlalchemy.__version__)

engine = create_engine('sqlite:///:memory:', echo=True)

# engine = create_engine('mysql+mysqldb://...', pool_recycle=3600)
# engine = create_engine('mysql+pymysql://localhost/test', echo=True)
# engin = create_engine('mysql+mysqlconnector://<user>:<password>@<host>[:<port>]/<dbname>', echo=True)
# engine = create_engine('mysql+mysqlconnector://localhost/test', echo=True)

metadata = MetaData()
users = Table('users', metadata,
    Column("id", Integer, primary_key=True),
    Column("name", String),
    Column("fullname", String))

metadata.create_all(engine)

ins = users.insert().values(name="kk", fullname="xxx")
print(str(ins))

conn = engine.connect()

result = conn.execute(ins)
